<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>Player</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock.js" TYPE="text/javascript"
></SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
></TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>Player</FONT
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
>Current state for a player.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
> <A HREF="#t%3AT"
>T</A
> </TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aplayer"
>player</A
> :: String -&gt; <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aname"
>name</A
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; String</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Ahand"
>hand</A
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; [<A HREF="Card.html#t%3AT"
>T</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Amoney"
>money</A
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; Int</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AinPlay"
>inPlay</A
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; Bool</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Abets"
>bets</A
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; Int -&gt; <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdealTo"
>dealTo</A
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; [<A HREF="Card.html#t%3AT"
>T</A
>] -&gt; <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Adraws"
>draws</A
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; <A HREF="Deck.html#t%3AT"
>T</A
> -&gt; Int -&gt; (<A HREF="Player.html#t%3AT"
>T</A
>, <A HREF="Deck.html#t%3AT"
>T</A
>)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Adiscards"
>discards</A
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; [<A HREF="Card.html#t%3AT"
>T</A
>] -&gt; <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Afolds"
>folds</A
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Areset"
>reset</A
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Documentation</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
> <A NAME="t%3AT"
></A
><B
>T</B
> </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:T')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:T" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Show <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Aplayer"
></A
><B
>player</B
> :: String -&gt; <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="doc"
>Construct a new player.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Aname"
></A
><B
>name</B
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; String</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Ahand"
></A
><B
>hand</B
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; [<A HREF="Card.html#t%3AT"
>T</A
>]</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Amoney"
></A
><B
>money</B
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; Int</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AinPlay"
></A
><B
>inPlay</B
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; Bool</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Abets"
></A
><B
>bets</B
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; Int -&gt; <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="doc"
>Subtract the amount bet from the player's money.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AdealTo"
></A
><B
>dealTo</B
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; [<A HREF="Card.html#t%3AT"
>T</A
>] -&gt; <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="doc"
>Replace the player's hand with the dealt one.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Adraws"
></A
><B
>draws</B
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; <A HREF="Deck.html#t%3AT"
>T</A
> -&gt; Int -&gt; (<A HREF="Player.html#t%3AT"
>T</A
>, <A HREF="Deck.html#t%3AT"
>T</A
>)</TD
></TR
><TR
><TD CLASS="doc"
>Draw n cards from the deck into the player's hand.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Adiscards"
></A
><B
>discards</B
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; [<A HREF="Card.html#t%3AT"
>T</A
>] -&gt; <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="doc"
>Discard cards from the player's hand.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Afolds"
></A
><B
>folds</B
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="doc"
>The player folds.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Areset"
></A
><B
>reset</B
> :: <A HREF="Player.html#t%3AT"
>T</A
> -&gt; <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="doc"
>Reset the player to a pre-play state. (With money preserved.)
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 0.8</TD
></TR
></TABLE
></BODY
></HTML
>
